//
//  ViewController.m
//  利用model处理数据
//
//  Created by Mr&Clover on 2019/3/11.
//  Copyright © 2019年 MrC. All rights reserved.
//

#import "ViewController.h"
#import "MCViewController.h"

@interface ViewController ()
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;

@property (weak, nonatomic) IBOutlet UILabel *addressLabel;


@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
 
    NSString *string = [[NSString alloc] init];
    
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}

- (IBAction)pushNextView:(UIButton *)sender {
    
    MCViewController *vc = [[MCViewController alloc] init];
    
    // 在这里接收 block 传过来的值
    vc.modelBlock = ^(MCModel * _Nonnull model) {
        self.titleLabel.text = model.title;
        self.addressLabel.text = model.address;
    };
    
    [self presentViewController:vc animated:NO completion:nil];
}


@end
